package com.jic.member.controller.manage;

import com.jic.common.base.vo.RestResult;
import com.jic.manager.request.MerchantRequest;
import com.jic.manager.response.MemMerchantInfoResponse;
import com.jic.member.request.MemberScopeApplicationRequest;
import com.jic.member.service.MemberScopeApplicationService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/memberScopeApplication")
public class MemberScopApplicaionController {
    @Autowired
    MemberScopeApplicationService memberScopeApplicationeService;

    @ApiOperation("保存会员等级适用范围")
    @RequestMapping("saveScopeApplication")
    public RestResult<Long> saveScopeApplication(@RequestBody MemberScopeApplicationRequest memberScopeApplicationRequest){
        return memberScopeApplicationeService.insert(memberScopeApplicationRequest);
    }

    @ApiOperation("查询会员等级适用范围")
    @PostMapping(value = "/getGrowhtScopeInfo")
    public MemMerchantInfoResponse getGrowhtScopeInfo(@RequestBody MemberScopeApplicationRequest memberScopeApplicationRequest) {
        return memberScopeApplicationeService.getGrowhtScopeInfo(memberScopeApplicationRequest);
    }
}
